#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;
vector<int> A,C;
string a;
int b;


vector<int> mul(vector<int> &A,int b)
{
	vector<int> c;
	int t=0;
	for(int i=0;i<A.size()||t;i++){
		if(i<A.size()) t+=A[i]*b;
		c.push_back(t%10);
		t/=10;
	}
	return c;
}


int main()
{
	cin>>a>>b;
	for(int i=a.size()-1;i>=0;i--){
		A.push_back(a[i]-'0');
	}
	
	C=mul(A,b);
	
	for(int i=C.size()-1;i>=0;i--){
		printf("%d",C[i]);
	}
	return 0;
} 
